package com.pojo.order.service;

import com.pojo.order.entity.Payment;
import com.pojo.order.entity.Reservation;
import com.pojo.order.feign.PaymentFeignClient;
import com.pojo.order.feign.ReservationFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class PaymentService {

    @Autowired
    private PaymentFeignClient paymentFeignClient;

    public Map<Long, Payment> queryPaymentByUserId(Long id) {
        return paymentFeignClient.queryPaymentByUserId(id);
    }


    public String payTicket(Long userId, Long t_id) {
        return paymentFeignClient.payTicket(userId, t_id);
    }


    public String cancelPayment(Long userId, Long t_id) {
        return paymentFeignClient.cancelPayment(userId, t_id);
    }
}

